﻿
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(Rigidbody2D))]
public class LightDrag : MonoBehaviour
{
    [SerializeField] private float minForce=1000,maxForce=2000;
    void Start()
    {
        Rigidbody2D rigidbody2D = GetComponent<Rigidbody2D>();
        Random.Range(minForce, maxForce);
        Random.Range(minForce, maxForce);
        var f = Random.Range(minForce, maxForce);
        var c = Random.Range(0, 2);
        if (c==0)
        {
            f = -f;
        }
        Debug.Log(f);
        rigidbody2D.AddForce(new Vector2(f,0 ));
    }


}
